<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>


<h1><fmt:message key="role.form.pagetitle"/></h1>
<c:url var="viewRolesUrl" value="/admin/role/list" />
<a href="${viewRolesUrl}"><fmt:message key="role.view.title"/></a>
<br /><br />

<c:url var="saveRoleUrl" value="/admin/role/save" />
<form:form modelAttribute="role" method="POST" action="${saveRoleUrl}">
	<form:hidden path="id"/>
	<table collspadding="0px" border="0px" width="800px">
		<tr>
			<td width="80px"><form:label path="name"><fmt:message key="role.form.name"/>:</form:label></td>
			<td width="200px"><form:input path="name"/></td>
			<td width="200px"><form:errors path="name" cssClass="formerror" /></td>
		</tr>
		<tr>
			<td width="80px" valign="top"><form:label path="perms"><fmt:message key="role.form.permissions"/>:</form:label></td>
			<td>
				<form:select path="perms" multiple="true"  items="${permissions}" itemValue="id" itemLabel="name" />
			</td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td><input type="submit" value="<fmt:message key="buttons.save"/>" /></td>
			<td></td>
		</tr>
	</table>
	
</form:form>
